package com.turingitclub.yutian;

/**
 * Hello world!
 *
 */
public class App {
    public static void main( String[] args ) {
        /*//System.out.println( "Hello World!" );

        //stu.NORMAL_TEMPERATURE
        //Student.NORMAL_TEMPERATURE = 38.0;
        System.out.println("正常温度：" + Student.NORMAL_TEMPERATURE);

        // 创建对象，对象也叫类实例
        Student stu = new Student("张三");
        // 调用对象方法
        // System.out.println(stu.getName());
        //System.out.println(stu.getTemperature());
        stu.setTemperature(36.5);
        System.out.println(stu.getName() + ": " +  stu.getTemperature());

        Student stu2 = new Student("李四");
        stu2.setTemperature(38.0);
        System.out.println(stu2.getName() + ": " +  stu2.getTemperature());*/

       /* Room root = new Room();
        root.createStudent("张三", 36.5);
        root.createStudent("李四", 38.0);
        root.createStudent("王五", 40.0);

        List<Student> students = root.getStudents();
        System.out.println("所有学生" + students.toString()); //students是List，直接输出的是其toString()，就是其元素的toString

        // size()表示List元素数目，也就是学生数目
        root.println(students);

        root.firstHot();*/

        Student s1 = new Student("张三");
        //s1.name = "";
        Student s2 = new Student("李四");
        //System.out.println(s1==s2); // 理解成C语言中的指针相等
        System.out.println(s1.equals(s2));
        System.out.println("张三" == "李四");//  禁止 理解成C语言中的指针相等
        System.out.println("张三".equals("李四")); // ok JAVA中类对象判断相等的方法

        Student s3 = s1;
        s3.setTemperature(20.0);
        System.out.println(s1.equals(s3));
        System.out.println("结束");
    }


}

